<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue </title>
<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
<style>
    .class1{
        background-color: red;
    }
</style>
</head>
<body>
<div id="app">
  <p :class="{class1: cls}">{{ message }}</p>
  <p>{{ 1 + 1}}</p>
</div>

<script>
new Vue({
  el: '#app',
  data: {
    message: 'Hello Vue.js!',
    cls: true
  }
})
</script>
</body>
</html>